package com.zryc.shop.utils;

import lombok.Data;

@Data
public class Result<T> {
    private boolean flag;//返回请求是否成功
    private int code;//返回状态码200/404/404 等
    private String message;//返回消息
    private T data;

    public Result(boolean flag, int code, String message) {
        this.flag = flag;
        this.code = code;
        this.message = message;
    }

    public Result(boolean flag, int code, String message, T data) {
        this.flag = flag;
        this.code = code;
        this.message = message;
        this.data = data;
    }



}
